/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.giant.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author taticay
 */
@Embeddable
public class InCatalogPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_catalog")
    private int idCatalog;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_class")
    private int idClass;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_line")
    private int idLine;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_brand")
    private int idBrand;

    public InCatalogPK() {
    }

    public InCatalogPK(int idCatalog, int idClass, int idLine, int idBrand) {
        this.idCatalog = idCatalog;
        this.idClass = idClass;
        this.idLine = idLine;
        this.idBrand = idBrand;
    }

    public int getIdCatalog() {
        return idCatalog;
    }

    public void setIdCatalog(int idCatalog) {
        this.idCatalog = idCatalog;
    }

    public int getIdClass() {
        return idClass;
    }

    public void setIdClass(int idClass) {
        this.idClass = idClass;
    }

    public int getIdLine() {
        return idLine;
    }

    public void setIdLine(int idLine) {
        this.idLine = idLine;
    }

    public int getIdBrand() {
        return idBrand;
    }

    public void setIdBrand(int idBrand) {
        this.idBrand = idBrand;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idCatalog;
        hash += (int) idClass;
        hash += (int) idLine;
        hash += (int) idBrand;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof InCatalogPK)) {
            return false;
        }
        InCatalogPK other = (InCatalogPK) object;
        if (this.idCatalog != other.idCatalog) {
            return false;
        }
        if (this.idClass != other.idClass) {
            return false;
        }
        if (this.idLine != other.idLine) {
            return false;
        }
        if (this.idBrand != other.idBrand) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.giant.entities.InCatalogPK[ idCatalog=" + idCatalog + ", idClass=" + idClass + ", idLine=" + idLine + ", idBrand=" + idBrand + " ]";
    }
    
}
